read_process_output_set_last_coding_system: Extract, reuse
authorDmitry Gutov <dmitry@gutov.dev>
Tue, 11 Jun 2024 02:36:51 +0000 (05:36 +0300)
committerDmitry Gutov <dmitry@gutov.dev>
Tue, 11 Jun 2024 02:37:45 +0000 (05:37 +0300)
commitd9890bb87063b402853ff0e4ea8bbfc92e5d6e00
treed1ffbdfd9d5e7cc3b0de682e7e5dc8affbea2803
parentf33806dd6624e874d5cff3cd02ab370f518c0629
read_process_output_set_last_coding_system: Extract, reuse

* src/process.c (read_process_output_set_last_coding_system):
New function, extracted from read_and_dispose_of_process_output.
(read_and_dispose_of_process_output): Update accordingly.
(read_and_insert_process_output): Use it here instead of just
transferring carryover (bug#66020, also mentioned in bug#71452).
src/process.c